<html>
    <head>
        <meta charset="UTF-8">
        <title>BOM编程中的window内置对象</title>
        <script type="text/javascript">
            function goSumushao(){
                //以下这段代码JS代码也可以向服务器发送请求
                //window.location.href = "https://www.sumushao.com";
                window.location = "https://www.sumushao.com";
                //DOM编程中的document对象也可以完成发送请求
               // document.location.href = "https://www.sumushao.com";
               // document.location = "https://www.sumushao.com";
            }
        
        </script>
    </head>
    <body>
        <a href="https://www.sumushao.com" >sumushao</a>
        <input type="button" value="sumushao" onclick="goSumushao();"/>
    </body>
</html>